package com.ruoyi.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum ProjectTaskStatus {
    //任务状态：0-未完成，1-已完成，2-审核通过，3-被驳回
    INCOMPLETE("0","未完成"),
    COMPLETE("1","已完成"),
    AUDIT_PASS("2","审核通过"),
    REJECT("3","被拒绝"),
    ;

    private String value;
    private String name;

    public static ProjectTaskStatus valuesOf(String value) {
        //获取所有枚举集合
        ProjectTaskStatus[] es = values();
        for (ProjectTaskStatus e : es) {
            if (Objects.equals(e.getValue(), value)) {
                return e;
            }
        }
        return null;
    }
}
